<style>
.width {
	min-width: 119px;
}
</style>
			<section class="wrapper">
				<!-- page start-->
				<section class="panel">
					<header class="panel-heading">
						REVIEWS MANAGEMENT <span class="pull-right"></span>
					</header>
					<div class="panel-body">
						

							<div class="input-group col-lg-5 pull-right">
                                          <form name="action" method="POST"
							action="<?=base_url(); ?>reviews/admin/admin_review">
							
							<div class="col-lg-offset-2 col-lg-6">
							 <!-- <input type="text" class="form-control"> --></div>
							 <select class="form-control" name="filter" style="width:100px"
								onchange="this.form.submit()">
								<option value="">Action</option>
								<!-- <option value="search">Search</option> -->
								<option value="inactive">Inactive</option>
								<option value="active">Active</option>
							
							</select>
						</form>
                                          
                                          
                                             
                                              </div>
                                          </div>

						

						<table class="table table-striped table-advance table-hover">
							<thead>
								<tr>
									<th><i class="icon-bullhorn"></i> Listing Name</th>
									<th><i class="icon-bookmark"></i> Comment</th>
									<th><i class="icon-bookmark"></i> STATUS</th>
									<th><i class=" icon-edit"></i> ACTION</th>
								</tr>
							</thead>
							<tbody>
							<?php if($review['all']){?>
					<?php foreach ($review['all'] as $reviews) : ?>
								<tr>
								<td>
								<b><?= $this->admin_listing_model->get_business_name($reviews->profile_id)->title;?></b>
								
									
									<p class="small"><b>Posted On:</b> 
						<?= $reviews->posted_on; ?>
						<b>By :</b> <?= $reviews->full_name;?>
						
						</p>
								</td>
									<td class="hidden-phone"><?= substr($reviews->comment,0,50);?></td>
									<td>
									<?php if($reviews->status ==51){?>
									<button class="btn btn-success btn-xs">
											<i class=" icon-ok"> Active</i>
										</button>
									<?php }else{?>
									<button class="btn btn-danger btn-xs">
											<i class=" icon-remove"> Inactive</i>
										</button>
									<?php }?>
										</td>

									<td>
										<div class="dropdown">
											<a href="javascript:;"
												class="dropdown-toggle btn btn-danger btn-xs"
												data-toggle="dropdown">Menu <b class="caret"></b>
											</a>
											
												<ul class="dropdown-menu width">
									<li>
									<?php if($reviews->status ==1){?>
									<a href="<?= base_url(); ?>reviews/admin/admin_review/change_reviews_status/<?= $reviews->status;?>/<?= $reviews->id; ?>"
									<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Demo mode '); return false;"
									<?} else?> onclick="return confirm('Are you sure ?');"><button
												class="btn btn-primary btn-xs">
												<i class="icon-thumbs-up"></i>
											</button> Active</a>
											
											</li>
											
									<li>
									<?php }else{?>
									<a href="<?= base_url(); ?>reviews/admin/admin_review/change_reviews_status/<?= $reviews->status;?>/<?= $reviews->id; ?>"
									<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Demo mode '); return false;"
									<?} else?> onclick="return confirm('Are you sure ?');"><button
												class="btn btn-danger btn-xs">
												<i class="icon-thumbs-down"></i>
											</button> Inactive</a>
											<?php }?>
											
											</li>
									<li><a href="<?= base_url(); ?>reviews/admin/admin_review/edit/<?= $reviews->id; ?>"
									<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Demo mode '); return false;"
									<?} else?> onclick="return confirm('Are you sure ?');"><button
												class="btn btn-primary btn-xs">
												<i class="icon-pencil"></i>
											</button> Edit</a></li>
									<li><a href="<?= base_url(); ?>reviews/admin/admin_review/delete_reviews/<?= $reviews->id;?>"
									<?php if($this->config->item('mode')=='DEMO'){?>
										onclick="alert ('Sorry! Demo mode '); return false;"
									<?} else?> onclick="return confirm('Are you sure ?');"><button
												class="btn btn-danger btn-xs">
												<i class="icon-trash"></i>
											</button> Delete</a></li></ul>
											
										</div>
										</li>
									</td>
								</tr>
<?php endforeach; 
}else { echo "No Data found....";
}?>						</tbody>
						</table>
						</div>
					<!-- End of Body Panel -->
				</section>
				<!-- page end-->
			</section>
		</section>
